// 应用层面管理
const reducer = (state = {
    num: 999
}, { type, payload }: {
    type: any;
    payload: any;
}) => {
    switch (type) {
        case 'ADD':
            return {
                num: state.num + 1
            }
        case 'MUD':
            return {
                num: state.num - 1
            }
        default:
            return state
    }
}
export default reducer